
layui.use('form', function () {
    var form=layui.form;
    form.on('select(isenable)', function (data) {
        console.log(data)
        $("#isable").val(data.value);
    });
    form.on('submit(formDemo)', function(data){
        console.log(data.field);
        $.ajax({
            type: "post",
            url: "/advanced/addpermissionstable",
            data:data.field,
            success:function(res){
                if(res.state==200){

                    parent.refresh1();
                    var index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                }
            }
        })
    });
})
